import {
	createSSRApp
} from "vue";
import App from './App.vue'
import * as Pinia from 'pinia'
import { createUnistorage } from 'pinia-plugin-unistorage'
import shareMixins from '@/mixins/share'

export function createApp() {
	const app = createSSRApp(App)
  const store = Pinia.createPinia()
  store.use(createUnistorage()) // 持久化数据
  app.use(store)

  // 全局分享
  app.mixin(shareMixins)

	return {
		app,
		Pinia,
	};
}
